<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CrawlerPictuer extends Model
{
    use Traits\CrawlerPictuerHelper;
    protected $fillable = ['origin', 'oss', 'crawler','category_id', 'crawler_article_id', 'download_count', 'tags'];

    protected $connection = 'crawler-mysql';

    /*public function pictuer()
    {
        return $this->hasOne('App\Models\Pictuer');
    }*/
    public function category()
    {
        return $this->belongsTo(Category::class);
    }

    public function article()
    {
        return $this->belongsTo(CrawlerArticle::class, 'crawler_article_id');
    }

}
